using ATL;
using System;
using System.Runtime.InteropServices;
namespace ARNetToC
{
	public class API
	{
		protected override void Finalize()
		{
		}
		public unsafe static object eval(object v)
		{
			CComVariant cComVariant;
			<Module>.VariantInit((tagVARIANT*)(&cComVariant));
			object objectForNativeVariant;
			try
			{
				CComVariant cComVariant2;
				<Module>.VariantInit((tagVARIANT*)(&cComVariant2));
				try
				{
					IntPtr intPtr = default(IntPtr);
					intPtr = new IntPtr((void*)(&cComVariant));
					IntPtr intPtr2 = intPtr;
					Marshal.GetNativeVariantForObject(v, intPtr2);
					<Module>.evalImpl((tagVARIANT*)(&cComVariant), (tagVARIANT*)(&cComVariant2));
					<Module>.VariantClear((tagVARIANT*)(&cComVariant));
					IntPtr intPtr3 = default(IntPtr);
					intPtr3 = new IntPtr((void*)(&cComVariant2));
					intPtr2 = intPtr3;
					objectForNativeVariant = Marshal.GetObjectForNativeVariant(intPtr2);
					<Module>.VariantClear((tagVARIANT*)(&cComVariant2));
				}
				catch
				{
					<Module>.__CxxCallUnwindDtor(<Module>.__unep@??1CComVariant@ATL@@$$FQAE@XZ, (void*)(&cComVariant2));
					throw;
				}
				<Module>.VariantClear((tagVARIANT*)(&cComVariant2));
			}
			catch
			{
				<Module>.__CxxCallUnwindDtor(<Module>.__unep@??1CComVariant@ATL@@$$FQAE@XZ, (void*)(&cComVariant));
				throw;
			}
			<Module>.VariantClear((tagVARIANT*)(&cComVariant));
			return objectForNativeVariant;
		}
		public void __dtor()
		{
			GC.SuppressFinalize(this);
			this.Finalize();
		}
	}
}
